From 05a987a26a87e0bf620d9318a26fa4ffb69a4c09 Mon Sep 17 00:00:00 2001 From: Debian Science Maintainers Date: Fri, 24 Apr 2020 15:17:04 +0100 Subject: [PATCH] Loosen tolerances on some tests on i386 Failure log https://buildd.debian.org/status/fetch.php?pkg=statsmodels&arch=i386&ver=0.9.0-3&stamp=1567157609&raw=0 As it only fails on i386 (not x32) and isn't far over tolerance, I suspect different rounding due to x87 excess precision Author: Rebecca N. Palmer Bug-Debian: https://bugs.debian.org/938949 Forwarded: no Gbp-Pq: Name i386_loosen_test_tolerances.patch --- statsmodels/tsa/statespace/tests/test_smoothing.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/statsmodels/tsa/statespace/tests/test_smoothing.py b/statsmodels/tsa/statespace/tests/test_smoothing.py index 335621f..4074239 100644 --- a/statsmodels/tsa/statespace/tests/test_smoothing.py +++ b/statsmodels/tsa/statespace/tests/test_smoothing.py @@ -26,8 +26,9 @@ from statsmodels.tsa.statespace.kalman_smoother import ( SMOOTH_UNIVARIATE) current_path = os.path.dirname(os.path.abspath(__file__)) - - +import sys +import glob +i386_looser_tolerances=len(glob.glob('/usr/lib/i386-*/'))>0 and np.log2(sys.maxsize)<=32 class TestStatesAR3(object): @classmethod def setup_class(cls, alternate_timing=False, *args, **kwargs): @@ -831,7 +832,7 @@ class TestMultivariateVARUnivariate(object): def test_forecasts_error_cov(self): assert_allclose( self.results.forecasts_error_cov.diagonal(), - self.desired[['F1', 'F2', 'F3']] + self.desired[['F1', 'F2', 'F3']],rtol=2e-7 if i386_looser_tolerances else 1e-7 ) def test_predicted_states(self): @@ -885,7 +886,7 @@ class TestMultivariateVARUnivariate(object): def test_smoothed_measurement_disturbance_cov(self): assert_allclose( self.results.smoothed_measurement_disturbance_cov.diagonal(), - self.desired[['Veps1', 'Veps2', 'Veps3']] + self.desired[['Veps1', 'Veps2', 'Veps3']],rtol=2e-7 if i386_looser_tolerances else 1e-7 ) -- 2.30.2